<template>
	<view class="container">

		<view class='title'>
			<view class='mgxMoney'>${{amount}}</view>
		</view>
		<view class="my-item">
			<navigator url="/pages/mangox/transfer/transfer" hover-class="navigator-hover">转账</navigator>
		</view>
		<view class="my-item">
			<navigator url="/pages/mangox/gettxs/gettxs" hover-class="navigator-hover">交易记录</navigator>
		</view>
		<view class="my-item">
			<navigator url="" hover-class="navigator-hover">发红包</navigator>
		</view>
		<view class="my-item">
			<navigator url="" hover-class="navigator-hover">抢红包</navigator>
		</view>
		<!-- 用于撑高 -->
		<view style="height:2000px;">
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				amount: null
			}
		},
		onLoad: function() {
			uni.request({
				url: 'http://'+getApp().globalData.mpAddress+'/getbalance',
				method: 'GET',
				data: {
					hash: getApp().globalData.userData['MgxHashID']
				},
				success: res => {
					console.log(res.data)
					this.amount = res.data.amount
				},
				fail: () => {},
				complete: () => {}
			});
		}
	}
</script>

<style>
	@import './index.css';
</style>
